home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / icm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-10  |  3.4 KB  |  138 lines

  1. /*
  2.                                      I C M . H
  3.  
  4.     Generic definitions of the target operating systems.
  5. */
  6.  
  7. /*************************************************************************
  8.     define _PROTOTYPES unconditionally
  9.     define MAXCMDLEN:  the max command line length
  10.  
  11.     VOIDP, MARG, ARG macros: now superfluous, but kept for economy reasons
  12.     (it's better to be lazy than tired)
  13.  
  14.     Undefine any unwanted _NO_PROTOTYPES or _NOPROTOTYPES
  15. */                                                      
  16.  
  17. #define _PROTOTYPES
  18. #ifdef MSDOS
  19. #    define MAXCMDLEN   100
  20. #else
  21. #    define MAXCMDLEN   500
  22. #endif
  23. #define ARG(x)      x
  24. #define MARG        , ...
  25. #define VOIDP       void*
  26.  
  27. #ifdef _NO_PROTOTYPES
  28. #   undef _NO_PROTOTYPES
  29. #endif
  30.  
  31. #ifdef _NOPROTOTYPES
  32. #   undef _NOPROTOTYPES
  33. #endif
  34.  
  35. /*************************************************************************
  36.     P_CHECK value for implied function argument of system, chdir, etc
  37.     P_NOCHECK when not checking
  38.     P_CHECKMODE(int mode) is true when mode indicates checking
  39. */
  40. #ifndef P_CHECK
  41. #    define P_CHECK                 0
  42. #endif
  43. #ifndef P_NOCHECK
  44. #    define P_NOCHECK               2
  45. #endif
  46. #ifndef P_CHECKMODE
  47. #    define P_CHECKMODE(x)          (! ((x) & P_NOCHECK) )
  48. #endif
  49.  
  50. /*************************************************************************
  51.      directory objects
  52. */
  53.  
  54. #define O_FILE                      1
  55. #define O_DIR                       2
  56. #define O_SUBDIR                    4
  57. #define O_ALL                       8
  58.  
  59. /*************************************************************************
  60.      IS_ attributes
  61. */
  62.  
  63. #define IS_IFDIR                    1
  64. #define IS_IFCHR                    2
  65. #define IS_IFREG                    4
  66. #define IS_IREAD                    8
  67. #define IS_IWRITE                   16
  68. #define IS_IEXEC                    32
  69.  
  70. /*************************************************************************
  71.      file attributes
  72. */
  73.  
  74. #ifndef A_NORMAL
  75. #    define A_NORMAL                0x00
  76. #endif
  77.  
  78. #ifndef A_RDONLY
  79. #    define A_RDONLY                0x01
  80. #endif
  81.  
  82. #ifndef A_HIDDEN
  83. #    define A_HIDDEN                0x02
  84. #endif
  85.  
  86. #ifndef A_SYSTEM
  87. #    define A_SYSTEM                0x04
  88. #endif
  89.  
  90. #ifndef A_VOLID
  91. #    define A_VOLID                 0x08
  92. #endif
  93.  
  94. #ifndef A_SUBDIR
  95. #    define A_SUBDIR                0x10
  96. #endif
  97.  
  98. #ifndef A_ARCH
  99. #    define A_ARCH                  0x20
  100. #endif
  101.  
  102. /**************************************************************************
  103.     MSDOS/UNIX specific macros
  104. */
  105.  
  106. #ifndef P_WAIT
  107. #define P_WAIT                      0
  108. #endif
  109.  
  110. #ifdef MSDOS
  111. #    define DIRSEP                  '\\'
  112. #    define DRIVESEP                ':'
  113. #    define INT32                   signed long
  114. #    define UNS32                   unsigned long
  115. #    define READBINARY              "rb"
  116. #    define WRITEBINARY             "wb"
  117. #else
  118. #    define near
  119. #    define _MAX_PATH               260
  120. #    define _MAX_DRIVE              2
  121. #    define _MAX_DIR                _MAX_PATH
  122. #    define _MAX_FNAME              _MAX_PATH
  123. #    define _MAX_EXT                _MAX_PATH
  124. #    define DIRSEP                  '/'
  125. #    define DRIVESEP                0
  126. #    define INT32                   signed int
  127. #    define UNS32                   unsigned int
  128. #    define READBINARY              "r"
  129. #    define WRITEBINARY             "w"
  130. #    define _execvp                 execvp
  131. #endif
  132.  
  133. #define INT8  signed char
  134. #define INT16 signed short
  135. #define UNS16 unsigned short
  136.  
  137.  
  138.